import request from '@/utils/request'


export const getBatteryList = (page,limit,from) => {
    return request({
        url: '/api/'+page+"/"+limit,
        method: 'get',
        params:from
    })
}

export const FindCategoryByParentId = () => {
    return request({
        url: '/api/province',
        method: 'get',
    })
}

export const CityList = (value) => {
    return request({
        url: '/api/city/'+value,
        method: 'get',
    })
}

export const DistrictList = (value) => {
    return request({
        url: '/api/area/'+value,
        method: 'get',
    })
}

export const getUpdateState = id =>{
    return request({
        url: '/api/updateBatteryState/'+id,
        method: 'get',
    })
}

export const getDeleteBattery = id =>{
    return request({
        url: '/api/deleteBattery/'+id,
        method: 'get',
    })
}

// 获取电池信息
export const getAddBattery = from =>{
    return request({
        url: '/api/addBattery',
        method: 'post',
        data:from
    })
}
